package com.bocai.dahuatech.utils;

import android.content.Context;
import android.content.SharedPreferences;

public class SharePrefencesUtil {

    public static String getUser_id(Context context){
        SharedPreferences sharedPreferences=context.getSharedPreferences("user", Context.MODE_PRIVATE);
        String user_id=sharedPreferences.getString("user_id","");
        return user_id;
    }

    public static String getCustomerCode(Context context){
        SharedPreferences sharedPreferences=context.getSharedPreferences("user", Context.MODE_PRIVATE);
        String customerCode=sharedPreferences.getString("customerCode", "");
        return customerCode;
    }
    public static boolean getIsRememberPsd(Context context)
    {SharedPreferences sharedPreferences=context.getSharedPreferences("user", Context.MODE_PRIVATE);
        boolean isrememberpsd=sharedPreferences.getBoolean("isremember", false);
        return isrememberpsd;

    }
    public static String getPsd(Context context)
    {SharedPreferences sharedPreferences=context.getSharedPreferences("user", Context.MODE_PRIVATE);
        String password=sharedPreferences.getString("password", "");
        return password;

    }
    public static String getuser_name(Context context)
    {SharedPreferences sharedPreferences=context.getSharedPreferences("user", Context.MODE_PRIVATE);
        String user_name=sharedPreferences.getString("user_name", "");
        return user_name;

    }
    public static String gettel(Context context)
    {SharedPreferences sharedPreferences=context.getSharedPreferences("user", Context.MODE_PRIVATE);
        String tel=sharedPreferences.getString("phone","");
        return tel;

    }

    public static String getCompanyName(Context context)
    {SharedPreferences sharedPreferences=context.getSharedPreferences("user", Context.MODE_PRIVATE);
        String companyName=sharedPreferences.getString("companyName","");
        return companyName;

    }
    public static int getFID(Context context)
    {SharedPreferences sharedPreferences=context.getSharedPreferences("user", Context.MODE_PRIVATE);
        int fid=sharedPreferences.getInt("fid", -1);
        return fid;

    }
    public static int getFAccessFlag(Context context)
    {SharedPreferences sharedPreferences=context.getSharedPreferences("user", Context.MODE_PRIVATE);
        int FAccessFlag=sharedPreferences.getInt("FAccessFlag",-1);
        return FAccessFlag;

    }

    public static String getProvince(Context context){
        SharedPreferences sharedPreferences=context.getSharedPreferences("user", Context.MODE_PRIVATE);
        String Province=sharedPreferences.getString("Province", "");
        return Province;
    }
    public static int getProvinceID(Context context){
        SharedPreferences sharedPreferences=context.getSharedPreferences("user", Context.MODE_PRIVATE);
        int ProvinceID=sharedPreferences.getInt("Provinceid", 0);
        return ProvinceID;
    }
    public static String getCity(Context context){
        SharedPreferences sharedPreferences=context.getSharedPreferences("user", Context.MODE_PRIVATE);
        String city=sharedPreferences.getString("City","");
        return city;
    }
    public static String getArea(Context context){
        SharedPreferences sharedPreferences=context.getSharedPreferences("user", Context.MODE_PRIVATE);
        String area=sharedPreferences.getString("Area","");
        return area;
    }

    public static int getCount(Context context)
    {SharedPreferences sharedPreferences=context.getSharedPreferences("user", Context.MODE_PRIVATE);
        int count=sharedPreferences.getInt("count", 0);
        return count;

    }
    public static int getIsFirst(Context context)
    {SharedPreferences sharedPreferences=context.getSharedPreferences("user", Context.MODE_PRIVATE);
        int count=sharedPreferences.getInt("first", 0);
        return count;

    }
    public static String getifpromotion(Context context){
        SharedPreferences sharedPreferences=context.getSharedPreferences("user", Context.MODE_PRIVATE);
        String ifpromotion=sharedPreferences.getString("ifpromotion", "");
        return ifpromotion;
    }
}
